package com.bing.Impl;

import com.bing.util.Context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2014/6/28.
 */
@Component
public class StartStep extends AbstrcatStep {
    private final static Logger logger = LoggerFactory.getLogger(StartStep.class);


    @Override
    public void preStart(Context context) {
        super.preStart(context);
        logger.info("开始刷...");
        long startTime = System.currentTimeMillis();
        context.setSetting("startTime", startTime);
    }

    @Override
    public void end(Context context) {
        super.end(context);
    }

    /**
     * 刷完
     */
    @Override
    public void exec(Context context) {
        context.getTaoListener().setStatus("开始刷: ");
    }

    @Autowired
    @Qualifier("login")
    public void setNextStep(AbstrcatStep nextStep) {
        super.setNextStep(nextStep);
    }
}
